ChangeNumberOfCopies Method

Wintellect PowerCollections

Collapse imageExpand ImageCollapseAll imageExpandAll imageDropDown imageDropDownHover imageCopy imageCopyHover image
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Changes the number of copies of an existing item in the bag, or adds the indicated number of copies of the item to the bag.

Namespace: Wintellect.PowerCollections
Assembly:  PowerCollections (in PowerCollections.dll)

Syntax

C#
public void ChangeNumberOfCopies(
	T item,
	int numCopies
)
Visual Basic (Declaration)
Public Sub ChangeNumberOfCopies ( _
	item As T, _
	numCopies As Integer _
)
Visual C++
public:
void ChangeNumberOfCopies (
	T item, 
	int numCopies
)

Parameters

item
T
The item to change the number of copies of. This may or may not already be present in the bag.
numCopies
Int32
The new number of copies of the item.

Remarks

Changing the number of copies takes approximately constant time, regardless of the number of items in the bag.

See Also